package com.koron.ticket.work.workPermit.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.ticket.work.workflow.bean.WorkFlow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class WorkPermit {

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "工作票id")
    private String workTicketId;

    @ApiModelProperty(value = "是否满足安全措施需求")
    private Integer securityStatus;

    @ApiModelProperty(value = "补充或者调整的措施")
    private String securityArrangementChange;

    @ApiModelProperty(value = "工作地点带电的母线、导线、部位、运行设备")
    private String workLocationDevice;

    @ApiModelProperty(value = "工作地点带电的隔离开关")
    private String workLocationSwitch;

    @ApiModelProperty(value = "注意点")
    private String attention;

    @ApiModelProperty(value = "其他注意事项")
    private String otherNotes;

    @ApiModelProperty(value = "许可时间")
    private Date permitTime;

    @ApiModelProperty(value = "许可命令方式")
    private String permitType;

    @ApiModelProperty(value = "工作要求时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date workTime;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createUserId;

    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "修改人ID", hidden = true)
    private String updateUserId;

    @ApiModelProperty(value = "修改人姓名", hidden = true)
    private String updateUserName;

    @ApiModelProperty(value = "最后修改时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 下面为了业务增加的字段
     */
    @ApiModelProperty(value = "签名列表")
    private List<WorkFlow> workFlowList;

    @ApiModelProperty(value = "仅用于工作票提交中的业务，与原数据中的id冲突")
    private String workPermitId;

    @ApiModelProperty(value = "仅用于工作票-许可阶段提交中的业务，用于存储签名的相关数据")
    private String workFlowListString;


}
